package com.qipay.excel.service;

import com.qipay.excel.vo.Cell;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.io.IOException;
import java.util.List;

/**
 * Creator: Yao
 * Date:    2017/12/3
 * For:
 * Other:
 */
public interface ExcelService {

    /***
     * 填空
     * @param file
     * @param cells
     * @return
     * @throws IOException
     */
    HSSFWorkbook fill(String file, List<Cell> cells) throws IOException;

    /***
     * 填充数据
     * @param list
     * @param detailList
     * @param rowIdx
     * @return
     */
    void fill(List<Cell> list, List<List<String>> detailList, int rowIdx);

    /***
     * 读取
     * @param file
     * @return
     * @throws IOException
     */
    List<List<String>> read(String file) throws IOException;
}
